package com.wanxi.dao.user;

import com.wanxi.domain.user.UserModel;
import com.wanxi.domain.user.vo.UserModelVo;
import com.wanxi.domain.user.vo.UserPageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IUserDao {

    //通过用户名与密码查询用户信息
    UserModel selectByNameAndPassword(@Param("name") String name, @Param("password") String password);

    //查询所有用户
    List<UserModel> selectAll(@Param("curr") int curr, @Param("limit") int limit);

    //插入用户
    int insertUser(UserModel userModel);

    //跟据id查询用户
    UserModel selectById(Integer id);

    //更新用户
    int update(UserModel userModel);

    //通过用户id删除用户
    int deleteById(UserModel userModel);

    //查询数据库记录数
    int getCount();

    //模糊查询
    List<UserModel> globalSearch(UserPageVo userPageVo);

    //模糊查询条数
    int getGlobalSeachCount(UserModelVo userModelVo);
}
